package com.machinecontroller.model;


/**
 * 配置model
 * Created by zhangxuehui on 2017/12/18.
 */
public class ConfigModel {
    private String portNum;//端口号
    private String imgPath;//图片的存放路径
    private String videoPath;//视频的存放路径
    private String registrationId;//极光推送的注册id
    private String devId;//设备id
    private String containerNum;//货柜号
    private long viewfliperTime;//轮播时间
    private long serviceCheckTime;//服务检查时间，查看app是否关闭
    private boolean isSuportVideo;//是否支持视频
    private boolean isForbidNotice;//是否禁止通知
    private boolean isBackgroundServiceStart;//后台线程是否启动

    ConfigModel(Builder builder) {
        this.portNum = builder.portNum;
        this.imgPath = builder.imgPath;
        this.videoPath = builder.videoPath;
        this.registrationId = builder.registrationId;
        this.devId = builder.devId;
        this.containerNum = builder.containerNum;
        this.serviceCheckTime = builder.serviceCheckTime;
        this.viewfliperTime = builder.viewfliperTime;
        this.isSuportVideo = builder.isSuportVideo;
        this.isForbidNotice = builder.isForbidNotice;
        this.isBackgroundServiceStart = builder.isBackgroundServiceStart;
    }

    public String getPortNum() {
        return portNum;
    }

    public String getImgPath() {
        return imgPath;
    }

    public String getVideoPath() {
        return videoPath;
    }

    public String getRegistrationId() {
        return registrationId;
    }

    public String getDevId() {
        return devId;
    }

    public String getContainerNum() {
        return containerNum;
    }

    public long getViewfliperTime() {
        return viewfliperTime;
    }

    public long getServiceCheckTime() {
        return serviceCheckTime;
    }

    public boolean isSuportVideo() {
        return isSuportVideo;
    }

    public boolean isForbidNotice() {
        return isForbidNotice;
    }

    public boolean isBackgroundServiceStart() {
        return isBackgroundServiceStart;
    }

    public void setPortNum(String portNum) {
        this.portNum = portNum;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public void setVideoPath(String videoPath) {
        this.videoPath = videoPath;
    }

    public void setRegistrationId(String registrationId) {
        this.registrationId = registrationId;
    }

    public void setDevId(String devId) {
        this.devId = devId;
    }

    public void setContainerNum(String containerNum) {
        this.containerNum = containerNum;
    }

    public void setViewfliperTime(long viewfliperTime) {
        this.viewfliperTime = viewfliperTime;
    }

    public void setServiceCheckTime(long serviceCheckTime) {
        this.serviceCheckTime = serviceCheckTime;
    }

    public void setSuportVideo(boolean suportVideo) {
        isSuportVideo = suportVideo;
    }

    public void setForbidNotice(boolean forbidNotice) {
        isForbidNotice = forbidNotice;
    }

    public void setBackgroundServiceStart(boolean backgroundServiceStart) {
        isBackgroundServiceStart = backgroundServiceStart;
    }


    public static class Builder {
        public Builder() {
        }

        String portNum;//端口号
        String imgPath;//图片的存放路径
        String videoPath;//视频的存放路径
        String registrationId;//极光推送的注册id
        String devId;//设备id
        String containerNum;//货柜号
        long viewfliperTime;//轮播时间
        private long serviceCheckTime;//服务检查时间，查看app是否关闭
        boolean isSuportVideo;//是否支持视频
        boolean isForbidNotice;//是否禁止通知
        boolean isBackgroundServiceStart;//后台线程是否启动

        public Builder setPortNum(String portNum) {
            this.portNum = portNum;
            return this;
        }

        public Builder setImgPath(String imgPath) {
            this.imgPath = imgPath;
            return this;
        }

        public Builder setVideoPath(String videoPath) {
            this.videoPath = videoPath;
            return this;
        }

        public Builder setRegistrationId(String registrationId) {
            this.registrationId = registrationId;
            return this;
        }

        public Builder setDevId(String devId) {
            this.devId = devId;
            return this;
        }

        public Builder setContainerNum(String containerNum) {
            this.containerNum = containerNum;
            return this;
        }

        public Builder setViewfliperTime(long viewfliperTime) {
            this.viewfliperTime = viewfliperTime;
            return this;
        }

        public Builder setServiceCheckTime(long serviceCheckTime) {
            this.serviceCheckTime = serviceCheckTime;
            return this;
        }


        public Builder setSuportVideo(boolean suportVideo) {
            isSuportVideo = suportVideo;
            return this;
        }

        public Builder setForbidNotice(boolean forbidNotice) {
            isForbidNotice = forbidNotice;
            return this;
        }

        public Builder setBackgroundServiceStart(boolean backgroundServiceStart) {
            isBackgroundServiceStart = backgroundServiceStart;
            return this;
        }

        public ConfigModel build() {
            return new ConfigModel(this);
        }
    }
}
